﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Npgsql;

namespace EMR
{
    public class UserDalpg
    {
        public static int SELECT(User user)
        {
            string sql = $"SELECT    1 " +
                $"FROM tb_user WHERE no = @No AND password = @Psw";
            NpgsqlConnection sqlConnection = new NpgsqlConnection();
            NpgsqlParameter[] pms = new NpgsqlParameter[]
            {
                     new NpgsqlParameter("@No",user.No)
                   , new NpgsqlParameter("@Psw",user.Password),
               
            };
            return (int)pssqlHelper.ExecuteScalar(sql, pms);

        }
    }
}
